import axios from 'axios'
export function Home(PageNumber,ExcludedSkus) {
  let data = 'ExcludedSkus=' + ExcludedSkus.join('&ExcludedSkus=')
  return axios.get('/api/Products?' +data, {
    params: {
      PageNumber,
      PageSize: 30,
      Sort:'DiscountRateHighToLow',
    }
  }).then((response) => {
    return Promise.resolve(response.data)

  })
    .catch(function (error) {
      console.log(error)
    })
}
export function HomeTop(PageNumber) {
  return axios.get('/api/TopProducts', {
    params: {
      PageNumber,
      ModuleType:'Home',
      PageSize: 3,
    }
  }).then((response) => {
    return Promise.resolve(response.data)

  })
    .catch(function (error) {
      console.log(error)
    })
}

